c7c7e21a3073e9c4574dac97b556c70f2f313f3b,api/src/main/java/org/openmrs/module/emrapi/EmrApiActivator.java,EmrApiActivator,started,#,94

Before Change


    public void started() {
        super.started();

        AdministrationService administrationService = Context.getAdministrationService();
        ProviderService providerService = Context.getProviderService();
        PersonService personService = Context.getPersonService();
        ConceptService conceptService = Context.getConceptService();

        createGlobalProperties(administrationService);
        createUnknownProvider(administrationService, providerService, personService);
        createConceptSource(conceptService);
        eventListener = new PatientViewedEventListener(daemonToken);
        Event.subscribe(EmrApiConstants.EVENT_TOPIC_NAME_PATIENT_VIEWED, eventListener);

After Change


    public void started() {
        super.started();

        administrationService = Context.getAdministrationService();
        providerService = Context.getProviderService();
        personService = Context.getPersonService();
        conceptService = Context.getConceptService();
        metadataMappingService = Context.getService(MetadataMappingService.class);

        createMissingMetadataMappings();
        createUnknownProvider();

        administrationService.setGlobalProperty(OpenmrsConstants.GP_VISIT_ASSIGNMENT_HANDLER, EmrApiVisitAssignmentHandler.class.getName());
        createConceptSource(conceptService);
        eventListener = new PatientViewedEventListener(daemonToken);
        Event.subscribe(EmrApiConstants.EVENT_TOPIC_NAME_PATIENT_VIEWED, eventListener);